import numpy as np
from numerial_grad import numerial_grad,numerial_grad_with_batch

def gradient_descent(f, init_x, learning_rate, step_num):
    x = init_x
    for step in range(step_num):
        x -= learning_rate*numerial_grad_with_batch(f,init_x)
    return x
